package cn.outsourcing.supermarket.mapper;

import cn.outsourcing.supermarket.common.constants.BackstageProviderConstants;
import cn.outsourcing.supermarket.po.HiolabsGoods;
import cn.outsourcing.supermarket.provider.BackstageGoodsProvider;
import cn.outsourcing.supermarket.vo.backstage.BackstageAllGoodsVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

/**
 * 后台商品 Mapper
 *
 * @author gzkemays
 * @since 2021/11/3 20:04
 */
@Mapper
public interface BackstageGoodsMapper {
  /**
   * 获取后台全部商品
   *
   * @param page 分页
   * @param name 关键字模糊查询
   * @param mode 查询类型
   * @param sort 排序模式
   * @return 返回全部商品值对象
   */
  @SelectProvider(
      value = BackstageGoodsProvider.class,
      method = BackstageProviderConstants.BACKSTAGE_GOODS_ALL)
  IPage<BackstageAllGoodsVO> getAllGoods(
      @Param(value = "page") IPage<HiolabsGoods> page,
      @Param(value = "name") String name,
      @Param(value = "mode") String mode,
      @Param(value = "sort") Integer sort);
}
